<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<script type="text/javascript"
	src="http://10.222.29.162:3456/js/jquery.js"></script>

<script type="text/javascript"
	src="http://10.222.29.162:3456/js/bootstrap.min.js"></script>
<script type="text/javascript"
	src="http://10.222.29.162:3456/js/jqzoom.pack.1.0.1.js"></script>
<link rel="stylesheet" type="text/css"
	href="http://10.222.29.162:3456/css/layout.css" />

<link rel="stylesheet" type="text/css"
	href="http://10.222.29.162:3456/css/bootstrap.min.css" />

<link rel="stylesheet" type="text/css"
	href="http://10.222.29.162:3456/css/bootstrap-theme.min.css" />
<link rel="stylesheet" type="text/css"
	href="http://10.222.29.162:3456/css/style.css" />
<style type="text/css">
a:link {
	text-decoration: none;
}

a:visited {
	text-decoration: none;
}

a:active {
	text-decoration: none;
}

.table-own td {
	text-align: center;
	align: center;
}

</style>



<title>Insert title here</title>
</head>
<body style="font-size: 16px;">
<input id="pagePath" type="hidden" value="${pageContext.request.contextPath}"/>
	<div class="view-topbar">
		<div class="topbar-console">
			<div class="tobar-head fl">
				<a href="#" class="topbar-logo fl"> <span><img src="#"
						width="20" height="20" /></span>
				</a> <a href="${pageContext.request.contextPath}/sec/home.jsp"
					class="topbar-home-link topbar-btn text-center fl"><span>管理控制台</span></a>
			</div>
		</div>
		<div>
			<ul class="fr">
				<li class="fl topbar-info-item"><a href="javascript:void(0);"
					class="topbar-btn"> <span class="fl text-normal" name="show">欢迎:${manager.uname}</span>
						<span class="icon-arrow-down"></span>
				</a></li>
			</ul>
		</div>
	</div>
	<div class="view-body">
		<div class="view-sidebar">
			<div class="sidebar-content">
				<div class="sidebar-nav" style="width: 200px;">
					<div class="sidebar-title">
						<a href="#"> <span class="icon"><b
								class="fl icon-arrow-down"></b></span> <span class="text-normal">商家信息管理</span>
						</a>
					</div>
					<ul class="sidebar-trans">
						<li>
							<!-- 全部商家页面 --> <a
							href="${pageContext.request.contextPath}/sec/merchant"> <b
								class="sidebar-icon"></b> <span class="text-normal"><button type="button" class="btn btn-danger active"  id="registerCount" style="VISIBILITY: hidden"></button>全部商家</span>
						</a>
						</li>
						<li>
							<!-- 待审核商家页面 --> <a
							href="${pageContext.request.contextPath}/sec/merchant/status/0">
								<b class="sidebar-icon"></b> <span class="text-normal">待审核商家</span>
						</a> <a href="${pageContext.request.contextPath}/sec/merchant/status/1">
								<b class="sidebar-icon"></b> <span class="text-normal">已审核商家</span>
						</a> <a href="${pageContext.request.contextPath}/sec/merchant/status/2">
								<b class="sidebar-icon"></b> <span class="text-normal">已拉黑商家</span>
						</a> <a href="${pageContext.request.contextPath}/sec/merchant/status/3">
								<b class="sidebar-icon"></b> <span class="text-normal">已驳回商家</span>
						</a>
						</li>
					</ul>
				</div>
				<div class="sidebar-nav" style="width: 200px;">
					<div class="sidebar-title">
						<a href="#"> <span class="icon"><b
								class="fl icon-arrow-down"></b></span> <span class="text-normal">广告信息管理</span>
						</a>
					</div>
					<ul class="sidebar-trans">
						<li>
							<!-- 全部商家页面 --> <a
							href="${pageContext.request.contextPath}/sec/advertisement/status/0"> <b
								class="sidebar-icon"></b> <span class="text-normal"><button type="button" class="btn btn-danger active"  id="advertCount" style="VISIBILITY: hidden"></button>待审核</span>
						</a>
						</li>
						<li>
							<!-- 待审核商家页面 --> <a
							href="${pageContext.request.contextPath}/sec/advertisement/status/1">
								<b class="sidebar-icon"></b> <span class="text-normal">广告位</span>
						</a> <a href="${pageContext.request.contextPath}/sec/advertisement/status/2">
								<b class="sidebar-icon"></b> <span class="text-normal">已移除</span>
						</a>
						</li>
					</ul>
				</div>
				<div class="sidebar-nav" style="width: 200px;">
					<div class="sidebar-title">
						<a href="#"> <span class="icon"><b
								class="fl icon-arrow-down"></b></span> <span class="text-normal">客户投诉管理</span>
						</a>
					</div>
					<ul class="sidebar-trans">
						<li>
							<!-- 全部商家页面 --> <a
							href="${pageContext.request.contextPath}/sec/complaint"> <b
								class="sidebar-icon"></b> <span class="text-normal">投诉列表</span>
						</a>
						</li>
					</ul>
				</div>
			</div>
		</div>
		<div
			style="background-color: white; width: 95%; height: 100%; float: right;">
				<table class="table table-striped table-hover table-own"
				style="margin-left: 3%;">
		<!--  --><tr><td colspan="5" align="center" style="text-align: center">广告列表</td></tr> -->
		<tr>
			<td width="40%" align="center">商家名字</td>
			<td width="40%" align="center">广告申请理由</td>
			<td width="40%" align="center">广告位竞标价</td>
			<td width="40%" align="center">审核状态</td>
			<td width="40%" align="center">操作</td>
		</tr>
		<c:forEach var="advertisement" items="${advertisements}" varStatus="status">
			<c:if test="${status.count%2==0}" >
              <tr>
           </c:if>
           <c:if test="${status.count%2!=0}" >
              <tr style="background-color: #d9edf7">
           </c:if>
			<td align="center" style="text-align: center;">	
				<a href="#">${advertisement.merchant.uname }</a>
			</td>
			<td align="center" style="text-align: center;">${advertisement.applyReason }</td>
			<td align="center" style="text-align: center;">${advertisement.tenderPrice }</td>
			<td align="center" style="text-align: center;">
			<c:if test="${advertisement.approvalStatus==0 }">
				<span class="label label-primary">未审核</span>
			</c:if>
			<c:if test="${advertisement.approvalStatus==1 }">
				<span class="label label-success">已在广告位</span>
			</c:if>
			<c:if test="${advertisement.approvalStatus==2 }">
				<span class="label label-warning">已被移除</span>
			</c:if>
			</td>
			<td>
				<input type="hidden" value="${advertisement.id}" name="advert_id">
						<button class="btn btn-primary" name="adv_detail" data-toggle='modal'
							data-target='#myAdvModal'>查看详情</button>
			</td>
		</tr>
		</c:forEach>
	</table>
			<!--模态框-->
			<div class="modal fade" id="myAdvModal" tabindex="-1" role="dialog"
				aria-labelledby="myModalLabel" aria-hidden="true">
				<div class="modal-dialog">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal"
								aria-hidden="true">&times;</button>
							<h4 class="modal-title" id="myModalLabel"></h4>
						</div>
						<div class="modal-body">
							<table id="adv_infoTable">
							<tr>
									<td>
										<div>
											<h1>商家具体广告信息</h1>
										</div>
				
									</td>
									</tr>
									<tr>
										<td>
										<div>
											<img
												src=""
												class="img-rounded" style="width: 200px; height: 140px;"
												alt="广告" name="advert"/>
										</div>
									</td>
									</tr>
									<tr>
										<td>
										<div name="adv_nameDiv">
											<h5>商家名称</h5>
											<label></label>
										</div>
										</td>
									</tr>
								<tr>
									<td>
										<div name="adv_tenderPriceDiv">
											<h5>竞争价格</h5>
											<label>status</label>
										</div>
									</td>
								</tr>
								<tr>
									<td>
										<div name="adv_foodTypeDiv">
											<h5>菜品类型</h5>
											<label>status</label>
										</div>
									</td>
								</tr>
								<tr>
									<td>
										<div name="adv_foodNameDiv">
											<h5>菜品名字</h5>
											<label>status</label>
										</div>
									</td>
								</tr>
								<tr>
									<td>
										<div name="adv_foodPriceDiv">
											<h5>菜品价格</h5>
											<label>status</label>
										</div>
									</td>
								</tr>
								<tr>
									<td>
										<div name="adv_applyReasonDiv">
											<h5>申请理由</h5>
											<label>status</label>
										</div>
									</td>
								</tr>
								<tr>
									<td>
										<div name="adv_statusDiv">
											<h5>审核状态</h5>
											<label>status</label>
										</div>
									</td>
								</tr>
							</table>

						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default"
								data-dismiss="modal">关闭</button>
							<div name="put_adv_id" id="put_adv_id">
								<input type="hidden" value="111111" name="adv_id">
							</div>
							<div name="addAdvButtonStatus"></div>
								
						</div>
					</div>
					<!-- /.modal-content -->
				</div>
				<!-- /.modal -->
			</div>
			<script type="text/javascript"
				src="http://10.222.29.162:3456/js/myjs.js"></script>
				<script type="text/javascript"
				src="http://10.222.29.162:3456/js/count.js"></script>
</html>